package com.weichuanbo.xwdz.mvp.model.api.service;
import com.weichuanbo.xwdz.mvp.model.entity.BaseResponse;
import com.weichuanbo.xwdz.mvp.model.entity.CheckVersionBean;
import com.weichuanbo.xwdz.mvp.model.entity.DictionaryBean;
import com.weichuanbo.xwdz.mvp.model.entity.FriendsListBean;
import com.weichuanbo.xwdz.mvp.model.entity.GetUserInfoBean;
import com.weichuanbo.xwdz.mvp.model.entity.HeartbeatBean;
import com.weichuanbo.xwdz.mvp.model.entity.SearchFriendBean;
import com.weichuanbo.xwdz.mvp.model.entity.ServerPKResultBean;
import com.weichuanbo.xwdz.mvp.model.entity.UserBean;
import java.util.List;
import java.util.Map;
import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by Administrator on 2017/6/7.
 */

public interface ApiServer {

    //获取心跳
    @POST("media.php?s=/Heartbeat/heartbeat")
    @FormUrlEncoded
    Observable<BaseResponse<HeartbeatBean>> heartbeat(@FieldMap Map<String, String> map);

    //获取验证码
    @POST("media.php?s=/Member/telsvcode")
    @FormUrlEncoded
    Observable<BaseResponse<Object>> getValidateCode(@FieldMap Map<String, String> map);
//    Observable<BaseResponse<List<Object>>> getValidateCode(@Query("serverTime") String serverTime, @Query("sign") String sign, @Query("phone") String phone);

    //登陆
    @POST("media.php?s=/Member/telregister")
    @FormUrlEncoded
    Observable<BaseResponse<UserBean>> login(@FieldMap Map<String, String> map);

    //三方登陆
    @POST("media.php?s=/Member/third_login")
    @FormUrlEncoded
    Observable<BaseResponse<UserBean>> thirdLogin(@FieldMap Map<String, String> map);

    //完善个人资料
    @POST("media.php?s=/Member/perfect_info")
    @FormUrlEncoded
    Observable<BaseResponse<List<UserBean>>> perfectnfo(@FieldMap Map<String, String> map);


    //搜索好友
    @POST("media.php?s=/Member/search_user")
    @FormUrlEncoded
    Observable<BaseResponse<List<SearchFriendBean>>> searchUser(@FieldMap Map<String, String> map);


    //获取用户信息
    @POST("media.php?s=/Member/get_userinfo")
    @FormUrlEncoded
    Observable<BaseResponse<GetUserInfoBean>> getUserInfo(@FieldMap Map<String, String> map);


    //获取字典
    @POST("media.php?s=/Dictionary/dictionary_list")
    @FormUrlEncoded
    Observable<BaseResponse<DictionaryBean>> getDictionary(@FieldMap Map<String, String> map);


    //添加好友
    @POST("media.php?s=/Friends/add_friends")
    @FormUrlEncoded
    Observable<BaseResponse<Object>> addFriend(@FieldMap Map<String, String> map);

    //设置好友备注
    @POST("media.php?s=/Friends/set_friendname")
    @FormUrlEncoded
    Observable<BaseResponse<Object>> setFriendName(@FieldMap Map<String, String> map);

    //屏蔽好友
    @POST("media.php?s=/Friends/refuse_message")
    @FormUrlEncoded
    Observable<BaseResponse<Object>> refuseMessage(@FieldMap Map<String, String> map);

    //取消屏蔽好友
    @POST("media.php?s=/Friends/cancel_shield")
    @FormUrlEncoded
    Observable<BaseResponse<Object>> cancelShield(@FieldMap Map<String, String> map);

    //删除好友
    @POST("media.php?s=/Friends/delete_friend")
    @FormUrlEncoded
    Observable<BaseResponse<Object>> deleteFriend(@FieldMap Map<String, String> map);

    //举报好友
    @POST("media.php?s=/Friends/report_friend")
    @FormUrlEncoded
    Observable<BaseResponse<Object>> reportFriend(@FieldMap Map<String, String> map);

    //获取好友请求列表
    @POST("media.php?s=/Friends/friends_list")
    @FormUrlEncoded
    Observable<BaseResponse<List<FriendsListBean>>> getFriendList(@FieldMap Map<String, String> map);


    //同意好友
    @POST("media.php?s=/Friends/receive_friends")
    @FormUrlEncoded
    Observable<BaseResponse<Object>> AcceptResponse(@FieldMap Map<String, String> map);

   /* //游戏列表
    @POST("media.php?s=/Game/game_list")
    @FormUrlEncoded
    Observable<BaseResponse<GamePagerBean>> getGameList(@FieldMap Map<String, String> map);
    */

    //版本升级
    @POST("media.php?s=/UpdateVersion/update_version")
    @FormUrlEncoded
    Observable<BaseResponse<CheckVersionBean>> checkVersion(@FieldMap Map<String, String> map);

    //领取奖励，领取单条  account   id 邮件id
    @POST("media.php?s=/Reward/ReceiveOne")
    @FormUrlEncoded
    Observable<BaseResponse<Object>> receiveOne(@FieldMap Map<String, String> map);

    //一键领取并删除 account    del（0 是一键领取   1  是 一键领取并删除）
    @POST("media.php?s=/Reward/ReciveAll")
    @FormUrlEncoded
    Observable<BaseResponse<Object>> reciveAll(@FieldMap Map<String, String> map);

    //删除邮件  account   id 邮件id
    @POST("media.php?s=/Reward/delMail")
    @FormUrlEncoded
    Observable<BaseResponse<Object>> delMail(@FieldMap Map<String, String> map);

    //设为已读邮件  account   id 邮件id
    @POST("media.php?s=/Reward/readMail")
    @FormUrlEncoded
    Observable<BaseResponse<Object>> readMail(@FieldMap Map<String, String> map);

    //
    @POST("media.php?s=/Activity/receive_activity")
    @FormUrlEncoded
    Observable<BaseResponse<Object>> receiveActivity(@FieldMap Map<String, Object> map );

    //胜负结果
    @POST("media.php?s=/Settlement/settlement_")
    @FormUrlEncoded
    Observable<BaseResponse<ServerPKResultBean>> settlement(@FieldMap Map<String, Object> map );

}

